<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>

<body>

<script>
    const interval = setInterval(function () {
        console.log('平安喜乐 万事顺逐')
    }, 1000)

    // 清除定时器
    clearInterval(interval)
</script>
</body>
</html>